package rmi;
import java.rmi.Naming;



public class MyServiceClient {

	public static void main(String[] args) {
		new MyServiceClient().go();
	}

	private void go() {
		try {
			MyService service = (MyService) Naming.lookup("rmi://127.0.0.1/RemoteHello");

			String s = service.sayHello();

			System.out.println(s);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
